﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Castle.ActiveRecord;
using NHibernate.Criterion;
using LIB;
using System.Collections;
public partial class usercontrol_leftMenuAdd : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            using(new SessionScope()){
                bindLoaiDuAn();
                bindQuanHuyen();
                bindMucGia();
                bindLoaiBDS();
            }
        }
        catch(Exception ex){}
    }
    protected void bindLoaiDuAn()
    {
        repDuAn.DataSource = catDeQuy.Category_Dequy(43, 2, " - - - ");
        repDuAn.DataBind();
    }
    protected void bindQuanHuyen()
    {
        repQuanHuyen.DataSource = catDeQuy.Category_Dequy(42, 5, " - - - ");
        repQuanHuyen.DataBind();
    }
    protected void bindMucGia()
    {
        repMucGia.DataSource = Category_Info.FindAll(Order.Asc("catOrder"), Expression.Eq("catParentID", Category_Info.Find(41)));
        repMucGia.DataBind();
    }
    protected void bindLoaiBDS()
    {
        repLoaiBDS.DataSource = Category_Info.FindAll(Order.Asc("catOrder"), Expression.Eq("catParentID", Category_Info.Find(44)));
        repLoaiBDS.DataBind();
    }
}